package tieba.web;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import tieba.core.CookieUtils;
import tieba.service.ICmsUserService;

@Controller
public class ApplicationController {

	@Resource
	private ICmsUserService cmsUserService;

	@RequestMapping(value = { "", "index" })
	public String index(HttpServletRequest req) {
		if (CookieUtils.isLogin(req, cmsUserService) != null)
			return "redirect:/menu";
		return "index";
	}

}
